package com.kaigejava.rulesengine.engine.core.api;

/**
 * @author kaigejava
 */
public enum RulesEngineApiResponse {
    /**
     * success
     */
    OK(0, "success"),
    /**
     * engine already stoped.
     */
    RULES_ENGINE_ALREADY_STOPED(1, "engine already stoped."),
    /**
     * engine already started.
     */
    RULES_ENGINE_ALREADY_STARTED(2, "engine already started."),
    /**
     * rules no exists.
     */
    RULES_ENGINE_RULES_NO_EXISTS(3, "rules no exists."),
    /**
     * engine no start.
     */
    RULES_ENGINE_NO_START(4, "engine no start."),
    /**
     * init kie runtime error.
     */
    RULES_ENGINE_INIT_RUNTIME_ERROR(5,"init kie runtime error."),
    /**
     * rules type no set.
     */
    RULES_ENGINE_RULETYPES_NOSET(6,"rules type no set."),
    /**
     * rules type no set or value error.
     */
    RULES_ENGINE_RULETYPES_ERROR(7,"rules type no set or value error."),
    /**
     * kie runtime busy,cannot execute rules.
     */
    KIE_RUNTIME_BUSY(8,"kie runtime busy,cannot execute rules."),
    /**
     * system error.
     */
    FAIL(-1, "system error.");

    private int code;
    private String msg;

    RulesEngineApiResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
